package org.yty.travelagencymongodb.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.yty.travelagencymongodb.model.Entity.GroupMessage;

public interface GroupMessageRepository extends MongoRepository<GroupMessage,Long> {

    @Query("{'chatGroupId': ?0}")
    Page<GroupMessage> findByChatGroupId(Long chatGroupId, Pageable pageable);
}
